package com.zryc.shop.ums.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.zryc.shop.ums.service.IMemberLevelService;
import com.zryc.shop.util.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 会员等级表 前端控制器
 * </p>
 *
 * @author LiYe
 * @since 2023-02-02
 */
@RestController
@RequestMapping("/ums/memberLevel")
@Api(tags = "会员等级接口")
public class MemberLevelController {
    @Autowired
    private IMemberLevelService memberLevelService;
    @GetMapping("/list")
    @ApiOperation("查询列表")
    public ResponseResult list(Integer defaultStatus) {
        QueryWrapper queryWrapper = new QueryWrapper();
        queryWrapper.eq("default_status", defaultStatus);
        return new ResponseResult(200, "查询完成", memberLevelService.list(queryWrapper));
    }
}
